/* 
 * Qinlan Shen
 * November 8, 2010
 * Pd. 8
 * 
 * Class for any enemies (Packet and Rose).  Holds basic methods for grazing and hitting the
 * player.
 * 
 */

import java.awt.*;

public class Enemy extends Movable
{
	//Calculates the angle from the Enemy to the player character
	public double getAngleToPlayer(Character c)
	{
		return Math.toDegrees(Math.atan((x - c.getX())/(y - c.getY())));
	}

	//Grazing
	public boolean superPlayerHit(Character c)
	{
		return super.playerHit(c);
	}
	
	public boolean playerHit(Character c)
	{
		int dist = (int)Math.sqrt(Math.pow(x - c.getX(), 2) + Math.pow(y - c.getY(), 2)) - c.getPacketHit();
		return (dist < hitbox);
	}
}